package com.example.new_music.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.os.Message;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.example.new_music.Main2Activity;
import com.example.new_music.MainActivity;
import com.example.new_music.R;

public class third extends Fragment {
    public static TextView textView;
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.third, container, false);
        Button jump = view.findViewById(R.id.jump);
         textView = view.findViewById(R.id.time);
        jump.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), Main2Activity.class);
                startActivity(intent);
                Message message = new Message();
                message.what=12;
                MainActivity.handler.sendMessage(message);
            }
        });
        return view;
    }

}
